package com.zrwl.poscloud.core.task.message;

import com.zrwl.poscloud.xo.service.MessageModelService;
import io.swagger.annotations.ApiModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author 刘思童
 * @create 2021/3/4 22:09
 **/
@Component
@ApiModel(value = "定时任务")
@Slf4j
public class MessageModelTask {


    @Autowired
    private MessageModelService messageModelService;

    // 每隔60秒执行一次
    @Scheduled(fixedDelay = 60000)
    protected void sendSms() {
        messageModelService.refreshConfig();
    }
}
